from enum import Enum

from langchain.output_parsers import EnumOutputParser


class Colors(Enum):
    RED = "red"
    GREEN = "green"
    BLUE = "blue"


parser = EnumOutputParser(enum=Colors)
print(parser.parse("red"))